numeric.to.nominal <- function(data.vector,breaks=0,labels=0){
	#default setting is to z-score the data. Anything below -1.96 is 'low', above 1.96 is 'high' and in between is "middle".
	if(breaks==0 || labels==0){
		breaks <- c(-Inf,-1.96,1.96,Inf)
		labels <- c('low','middle','high')
		data.vector <- scale(data.vector)
	}
	
	if(min(breaks) > min(data.vector)){
		print("The break minimum is bigger than in the data. Please check your breaks.")
		return(NULL)
	}
	if(max(breaks) < max(data.vector)){
		print("The break maximum is small than in the data. Please check your breaks.")
		return(NULL)
	}	
	
	if((length(labels)+1) == length(breaks)){
		return(cut(data.vector,breaks=breaks,labels=labels))
	}else{
		print("Sorry, the cutoffs and labels do not match")
		return(NULL)
	}
}